﻿using battlenet.wow.rt.domain.objects;
using battlenet.wow.rt.sdk.data.dto;
using battlenet.wow.rt.sdk.utility;

namespace battlenet.wow.rt.sdk.objects.Mapper
{
    internal class StatsMapper : Remapper<Statistic>
    {
        public override void RegisterMappers()
        {
            Register(typeof(StatInfo), input => Map(input as StatInfo));
        }

        internal Statistic Map(StatInfo info)
        {
            return  info == null
                ? new Statistic() 
                : new Statistic(info.Stat, info.Amount);
        }
    }
}